﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ContentManager.cs" company="Anton Frattaroli">
//   Copyright (c) Anton Frattaroli. All rights reserved.
// </copyright>
// <summary>
//   Defines the ContentManager class business object.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Lidocaine.BusinessLogic
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using Lidocaine.BusinessObjects;
    using Lidocaine.Data;

    /// <summary>
    /// Defines the ContentManager class.
    /// </summary>
    public static class ContentManager
    {
        public static BusinessObjects.Content New()
        {
            return new LazyContent();
        }

        /// <summary>
        /// Initializes a new instance of the Content class.
        /// </summary>
        /// <param name="id">The Content identifier.</param>
        public static BusinessObjects.Content GetContent(int id)
        {
            return Data.Content.Select(id);
        }

        public static void SaveAs(BusinessObjects.Content content)
        {
            Data.Content.Insert(content);
        }
    }
}